package com.trade.wzj.common.yang;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.trade.wzj.model.xiang.State;
import com.trade.wzj.service.yang.StateServiceYang;

@Controller
@RequestMapping("/StateControllerYang")
public class StateControllerYang {

	@Autowired
	@Qualifier("StateServiceYang")
	private StateServiceYang stateServiceYang;
	
	@RequestMapping("/findState")
	@ResponseBody
	public List<State> findState() {
		List<State> list = null;
		try {
			list = stateServiceYang.findState();
			for (State state : list) {
				System.out.println(state);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		return list;
	}
}
